package com.aurora.app.entity;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.aurora.app.enums.UtTsType;
import com.aurora.base.entity.BaseEntity;

/**
 * 关于物品的评论
 * @author win64
 *
 */
@Entity
@Table(name="tb_help_comment")
public class HelpComment extends BaseEntity implements Serializable{
	//private ThingStory thingStory;
	private Help help;
	private User user;
	private User toUser;
	private String content;
	@ManyToOne(cascade = {CascadeType.REFRESH}, optional = false, fetch = FetchType.LAZY)
	@JoinColumn(name = "f_user_id")
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	@ManyToOne(cascade = {CascadeType.REFRESH}, optional = false, fetch = FetchType.LAZY)
	@JoinColumn(name = "f_to_user_id")
	public User getToUser() {
		return toUser;
	}
	public void setToUser(User toUser) {
		this.toUser = toUser;
	}
	@Column(name="f_content")
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	
	
	@ManyToOne(cascade = {CascadeType.REFRESH}, optional = true, fetch = FetchType.LAZY)
	@JoinColumn(name = "f_help_id")
	public Help getHelp() {
		return help;
	}
	public void setHelp(Help help) {
		this.help = help;
	}
}
